package 策略模式;

/**
 * @program: leetcode
 * @description:
 * @author: HuRan QQ1345122890
 * @create: 2022-02-07 11:26
 */
public class Dog implements Comparable<Dog> {
    int food;

    @Override
    public int compareTo(Dog o) {
        Dog d = (Dog) o;
        if (this.food < d.food) return -1;
        else if (this.food > d.food) return 1;
        else return 0;
    }
}